package com.qd.pay.domain;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;


/**
 * @author sjk
 */
@Data
@Accessors(chain = true)
public class OrderRespDTO {

    private String respId;

    @NotBlank(message = "支付状态不能为空")
    @Size(max = 20, message = "支付状态长度不能超过{max}位")
    private String payCode;

    private String errMsg;

    private LocalDateTime timeStart;

    @NotBlank(message = "订单ID不能为空")
    @Size(max = 50, message = "订单ID长度不能超过{max}位")
    private String orderId;

    public void freeData() {
        this.respId = null;
        this.payCode = null;
        this.timeStart = null;
        this.orderId = null;
        this.errMsg = null;
    }
}
